package cn.hanna.springcloud.controller;

import cn.hanna.springcloud.entities.CommonResult;
import cn.hanna.springcloud.entities.Payment;
import cn.hanna.springcloud.service.openfeignservice.PaymentOFService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author smileha
 * @create 2021-10-17 17:22
 * @description
 */
@RestController
public class OrderOFController {

    @Autowired
    private PaymentOFService paymentOFService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult<Payment> getSerialById(@PathVariable("id") Long id){
        return paymentOFService.getSerialById(id);
    }


    @GetMapping("/consumer/payment/outtime")
    public String checkTimeOut(){
        return paymentOFService.checkOutTime();
    }

}
